package org.lewis.man.controllers;

import org.apache.commons.lang.StringUtils;
import org.lewis.common.utils.WebUtils;

import com.tocersoft.framework.core.annotations.Controller;
import com.tocersoft.framework.web.annotations.Mapping;
import com.tocersoft.framework.web.renderer.Renderer;
import com.tocersoft.framework.web.renderer.TemplateRenderer;

@Controller
public class CMSController {

	private final static String VP = "/WEB-INF/views/help/";

	@Mapping("/about")
	public Renderer simpleHanlder() throws Exception {
		String toptic = WebUtils.getParameter("toptic");
		if (StringUtils.isNotEmpty(toptic)) {
			return new TemplateRenderer(VP+ toptic + ".vm");
		}
		return new TemplateRenderer(VP + "about.vm");
	}

}
